package com.ck.ck_back.utils;

public class RedisKeyUtils {

    //保存用户点赞数据的key
    public static final String MAP_KEY_Comment_LIKED = "MAP_KEY_Comment_LIKED";


    public static final String MAP_KEY_Production_LIKED = "MAP_KEY_Production_LIKED";

    /**
     * 拼接被点赞的用户id和点赞的人的id作为key。格式 222222::333333
     * @param likedinitiativeId 被点赞的id
     * @param likedPostId 点赞的人的id
     * @return
     */
    public static String getLikedKey(int likedinitiativeId, String likedPostId){
        StringBuilder builder = new StringBuilder();
        builder.append(likedinitiativeId);
        builder.append("::");
        builder.append(likedPostId);
        return builder.toString();
    }

    public static String getLikedvalue(int state,Long updateTime){
        StringBuilder builder = new StringBuilder();
        builder.append(state);
        builder.append("::");
        builder.append(updateTime);
        return builder.toString();
    }

}
